package jsimus;

import java.util.Random;

public class Dice {
	Random rnd = new Random();
	public int roll(int num_dices, int num_scapes) {
		int result = 0;
		for (int i = 1; i<=num_dices; i++)
		{
			int randomNumber = rnd.nextInt(num_scapes);
			if (randomNumber == 0)
				randomNumber += 1;

			result += randomNumber;
		}
		return result;
	}
}
